using M13.Game.Entity;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace M13.Utility
{
    public class EntityDebugger : MonoBehaviour
    {
        private RectTransform _rectTransform;
        private Transform _cameraTrans;
        private Text _text;
        private Entity _entity;
        private void Start()
        {
            _rectTransform = GetComponent<RectTransform>();
            _cameraTrans = GetComponent<Canvas>().worldCamera.transform;
            _text = GetComponentInChildren<Text>();
            _entity = GetComponentInParent<Entity>();
        }

        private void Update()
        {
            _rectTransform.rotation = _cameraTrans.rotation;
            
        }

        public void SetContext(string context)
        {
            _text.text = context;
        }
        
        private void FixedUpdate()
        {
            
        }
    }
}